package com.qf.controller;

import com.qf.entity.Organ;
import com.qf.service.OrganService;
import com.qf.service.impl.OrganServiceImpl;
import com.qf.util.Constants;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/*
杨威
2021/10/5
19:18
*/
@WebServlet("/organ")
public class OrganController extends BaseController {
    public String selectOrgan(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        OrganService organService=new OrganServiceImpl();
        List<Organ> organList = organService.showAll();
        req.setAttribute("organList",organList);
        return  Constants.FORWARD+"/edit.jsp";
    }
}
